import App from './App.vue';
import { createApp } from 'vue';
import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css';
import './common.less';
import CraneElement from 'crane-element';
import 'element-plus/theme-chalk/dark/css-vars.css';
import 'crane-element/lib/style.css';
import router from './router';
import vClickOutside from './hooks/clickOutSide.ts';
import vSlideIn from './hooks/vSlideIn';
import vViewport from './hooks/viewport.ts';
import i18n from './i18n/index';
import 'virtual:svg-icons-register';
import SvgIcon from './components/SvgIcon.vue';
import pinia from './store';

const app = createApp(App);

app.component('SvgIcon', SvgIcon);
app.directive('clickOutside', vClickOutside);
app.directive('viewport', vViewport);
app.directive('slideIn', vSlideIn);
app.use(ElementPlus);
app.use(CraneElement);
app.use(router);
app.use(i18n);
app.use(pinia);
app.mount('#app');
